<!DOCTYPE html>


  <html class="light page-post">


<head>
  <meta charset="utf-8">
  
  <title>Hexo 使用笔记 | 东窗随笔</title>

  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  
    <meta name="keywords" content="hexo," />
  

  <meta name="description" content="hexo &amp;#x4F7F;&amp;#x7528;&amp;#x8FC7;&amp;#x7A0B;&amp;#x4E2D;&amp;#x7684;&amp;#x4E00;&amp;#x4E9B;&amp;#x7B14;&amp;#x8BB0;&amp;#xFF0C;&amp;#x4F7F;&amp;#x7528;&amp;#x5C0F;&amp;#x6280;&amp;#x5DE7;&amp;#x7B49;&amp;#x7B49;">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo 使用笔记">
<meta property="og:url" content="http://hanlyjiang.github.io/2016/08/08/hexo使用笔记/index.html">
<meta property="og:site_name" content="东窗随笔">
<meta property="og:description" content="hexo &amp;#x4F7F;&amp;#x7528;&amp;#x8FC7;&amp;#x7A0B;&amp;#x4E2D;&amp;#x7684;&amp;#x4E00;&amp;#x4E9B;&amp;#x7B14;&amp;#x8BB0;&amp;#xFF0C;&amp;#x4F7F;&amp;#x7528;&amp;#x5C0F;&amp;#x6280;&amp;#x5DE7;&amp;#x7B49;&amp;#x7B49;">
<meta property="og:updated_time" content="2016-12-08T10:13:52.796Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Hexo 使用笔记">
<meta name="twitter:description" content="hexo &amp;#x4F7F;&amp;#x7528;&amp;#x8FC7;&amp;#x7A0B;&amp;#x4E2D;&amp;#x7684;&amp;#x4E00;&amp;#x4E9B;&amp;#x7B14;&amp;#x8BB0;&amp;#xFF0C;&amp;#x4F7F;&amp;#x7528;&amp;#x5C0F;&amp;#x6280;&amp;#x5DE7;&amp;#x7B49;&amp;#x7B49;">

  

  
    <link rel="icon" href="/favicon.ico">
  

  <link href="/css/styles.css?v=d671a41f" rel="stylesheet">


  
    <link rel="stylesheet" href="/css/personal-style.css">
  

  

  
  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?57e94d016e201fba3603a8a2b0263af0";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>



  
    <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
  

  
    <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.3.0/css/font-awesome.min.css">
  
</head>

<body>


  
    <span id="toolbox-mobile" class="toolbox-mobile">观乎</span>
  

  <div class="post-header CENTER">
   
  <div class="toolbox">
    <a class="toolbox-entry" href="/">
      <span class="toolbox-entry-text">观乎</span>
      <i class="icon-angle-down"></i>
      <i class="icon-home"></i>
    </a>
    <ul class="list-toolbox">
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/archives/"
            rel="noopener noreferrer"
            target="_self"
            >
            博客
          </a>
        </li>
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/category/"
            rel="noopener noreferrer"
            target="_self"
            >
            分类
          </a>
        </li>
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/tag/"
            rel="noopener noreferrer"
            target="_self"
            >
            标签
          </a>
        </li>
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/about/"
            rel="noopener noreferrer"
            target="_self"
            >
            关于
          </a>
        </li>
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/atom.xml"
            rel="noopener noreferrer"
            target="_blank"
            >
            RSS
          </a>
        </li>
      
        <li class="item-toolbox">
          <a
            class="ROUND_RECT"
            href="/search/"
            rel="noopener noreferrer"
            target="_self"
            >
            搜索
          </a>
        </li>
      
    </ul>
  </div>


</div>


  <div id="toc" class="toc-article">
    <strong class="toc-title">文章目录</strong>
    <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#安装"><span class="toc-text">安装</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#基本命令-点击跳转到官方中文说明"><span class="toc-text">基本命令-点击跳转到官方中文说明</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#主题"><span class="toc-text">主题</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#问题"><span class="toc-text">问题</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#其他"><span class="toc-text">其他</span></a></li></ol>
  </div>



<div class="content content-post CENTER">
   <article id="post-hexo使用笔记" class="article article-type-post" itemprop="blogPost">
  <header class="article-header">
    <h1 class="post-title">Hexo 使用笔记</h1>

    <div class="article-meta">
      <span>
        <i class="icon-calendar"></i>
        <span>2016.08.08</span>
      </span>

      
        <span class="article-author">
          <i class="icon-user"></i>
          <span>hanlyjiang@outlook.com</span>
        </span>
      

      
  <span class="article-category">
    <i class="icon-list"></i>
    <a class="article-category-link" href="/categories/杂项/">杂项</a> / <a class="article-category-link" href="/categories/杂项/博客/">博客</a>
  </span>



      
        <span>
          <i class="icon-comment"></i>
          <a href="http://hanlyjiang.site/2016/08/08/hexo使用笔记/#disqus_thread"></a>
        </span>
      

      
      <i class="fa fa-eye"></i> 
        <span id="busuanzi_container_page_pv">
           &nbsp热度 <span id="busuanzi_value_page_pv">
           <i class="fa fa-spinner fa-spin"></i></span>℃
        </span>
      

      
      
    </div>
  </header>

  <div class="article-content">
    
      <p>hexo &#x4F7F;&#x7528;&#x8FC7;&#x7A0B;&#x4E2D;&#x7684;&#x4E00;&#x4E9B;&#x7B14;&#x8BB0;&#xFF0C;&#x4F7F;&#x7528;&#x5C0F;&#x6280;&#x5DE7;&#x7B49;&#x7B49;<br><a id="more"></a></p>
<p>&#x53C2;&#x8003;&#xFF1A; <a href="https://hexo.io/zh-cn/docs/commands.html" target="_blank" rel="external">&#x5B98;&#x65B9;&#x6587;&#x6863;</a></p>
<h2 id="&#x5B89;&#x88C5;"><a href="#&#x5B89;&#x88C5;" class="headerlink" title="&#x5B89;&#x88C5;"></a>&#x5B89;&#x88C5;</h2><ol>
<li>&#x5B89;&#x88C5;<a href="https://nodejs.org/zh-cn/" target="_blank" rel="external">NodeJs</a>    </li>
<li>&#x8FD0;&#x884C;    <code>npm install -g hexo-cli</code> &#x5B89;&#x88C5;    </li>
</ol>
<h2 id="&#x57FA;&#x672C;&#x547D;&#x4EE4;-&#x70B9;&#x51FB;&#x8DF3;&#x8F6C;&#x5230;&#x5B98;&#x65B9;&#x4E2D;&#x6587;&#x8BF4;&#x660E;"><a href="#&#x57FA;&#x672C;&#x547D;&#x4EE4;-&#x70B9;&#x51FB;&#x8DF3;&#x8F6C;&#x5230;&#x5B98;&#x65B9;&#x4E2D;&#x6587;&#x8BF4;&#x660E;" class="headerlink" title="&#x57FA;&#x672C;&#x547D;&#x4EE4;-&#x70B9;&#x51FB;&#x8DF3;&#x8F6C;&#x5230;&#x5B98;&#x65B9;&#x4E2D;&#x6587;&#x8BF4;&#x660E;"></a><a href="https://hexo.io/zh-cn/docs/commands.html" target="_blank" rel="external">&#x57FA;&#x672C;&#x547D;&#x4EE4;-&#x70B9;&#x51FB;&#x8DF3;&#x8F6C;&#x5230;&#x5B98;&#x65B9;&#x4E2D;&#x6587;&#x8BF4;&#x660E;</a></h2><ul>
<li><p>&#x5F00;&#x542F;&#x670D;&#x52A1;&#xFF1A; </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">hexo server [-i 192.168.24.124] [-l] [-o] [-p 4003] [-s]</div><div class="line">hexo server -p 4003</div></pre></td></tr></table></figure>
</li>
<li><p>&#x90E8;&#x7F72;&#x5230;&#x670D;&#x52A1;&#x5668;    </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">hexo deploy</div></pre></td></tr></table></figure>
</li>
</ul>
<h2 id="&#x4E3B;&#x9898;"><a href="#&#x4E3B;&#x9898;" class="headerlink" title="&#x4E3B;&#x9898;"></a>&#x4E3B;&#x9898;</h2><p>&#x5B98;&#x65B9;&#x9875;&#x9762;: <a href="https://hexo.io/themes/" target="_blank" rel="external">hexo &#x4E3B;&#x9898;</a></p>
<h2 id="&#x95EE;&#x9898;"><a href="#&#x95EE;&#x9898;" class="headerlink" title="&#x95EE;&#x9898;"></a>&#x95EE;&#x9898;</h2><ul>
<li>&#x535A;&#x5BA2;&#x8FC1;&#x5F99;<br>  &#x5728;&#x65B0;&#x7684;PC&#x73AF;&#x5883;&#x4E0B;clone&#x4E0B;github&#x4E0A;&#x7684;&#x9879;&#x76EE;&#x65F6;&#xFF0C;&#x8FD0;&#x884C;<code>hexo</code> &#x547D;&#x4EE4;&#x65F6;&#x63D0;&#x793A;&#x5982;&#x4E0B;&#x9519;&#x8BEF;&#xFF1A; <figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">ERROR Local hexo not found in E:\blog</div><div class="line">ERROR Try running: &apos;npm install hexo --save&apos;</div></pre></td></tr></table></figure>
</li>
</ul>
<p>&#x6B64;&#x65F6;&#x5728;&#x8BE5;&#x76EE;&#x5F55;&#x4E0B;&#x6267;&#x884C;&#x2019;npm install &#x5373;&#x53EF;&#x2019;&#xFF0C;&#x539F;&#x56E0;&#x662F;&#xFF1A;.gitignore&#x6587;&#x4EF6;&#x91CC;&#x9762;&#x5FFD;&#x7565;&#x4E86;node_modules&#x6587;&#x4EF6;&#x5939;&#xFF0C;&#x6240;&#x4EE5;&#x8FD9;&#x4E2A;&#x6587;&#x4EF6;&#x5939;&#x6CA1;&#x6709;&#x66F4;&#x65B0;&#x4E0A;&#x53BB;&#x3002;&#x6240;&#x4EE5;&#x7528;npm&#x91CD;&#x65B0;&#x5B89;&#x88C5;&#x5373;&#x53EF;&#x3002;    </p>
<h2 id="&#x5176;&#x4ED6;"><a href="#&#x5176;&#x4ED6;" class="headerlink" title="&#x5176;&#x4ED6;"></a>&#x5176;&#x4ED6;</h2><ol>
<li><p>&#x4F7F;&#x7528; <code>&lt;!--more--&gt;</code> &#x53EF;&#x4EE5;&#x663E;&#x793A;&#x6458;&#x8981;,<code>&lt;!--more--&gt;</code>&#x4EE5;&#x4E0A;&#x90E8;&#x5206;&#x4F1A;&#x663E;&#x793A;&#x4E3A;&#x6458;&#x8981;</p>
</li>
<li><p>&#x5728;hexo &#x4E2D;&#x4F7F;&#x7528;&#x672C;&#x5730;&#x56FE;&#x7247;: <a href="http://www.tuicool.com/articles/umEBVfI" target="_blank" rel="external">&#x5728; hexo &#x4E2D;&#x65E0;&#x75DB;&#x4F7F;&#x7528;&#x672C;&#x5730;&#x56FE;&#x7247;</a></p>
</li>
<li><p><a href="http://www.appinn.com/markdown/" target="_blank" rel="external">Markdown &#x8BED;&#x6CD5;&#x4E2D;&#x6587;&#x7248;</a></p>
</li>
<li><p><a href="https://hexo.io/zh-cn/docs/" target="_blank" rel="external">hexo &#x4E2D;&#x6587;&#x6587;&#x6863;</a></p>
</li>
</ol>

    
  </div>
</article>

</div>


  <div class="text-center donation">
    <div class="inner-donation">
      <span class="btn-donation">支持一下</span>
      <div class="donation-body">
        <div class="tip text-center">扫一扫，支持HanlyJiang</div>
        <ul class="theme.donation.items.length">
        
          <li class="item">
            <img src="/images/qr-wechat.png" alt="">
          </li>
        
          <li class="item">
            <img src="/images/qr_zhifubao.jpg" alt="">
          </li>
        
        </ul>
      </div>
    </div>
  </div>




  <a id="backTop" class="back-top">
    <i class="icon-angle-up"></i>
  </a>




  <div class="modal" id="modal">
  <span id="cover" class="cover hide"></span>
  <div id="modal-dialog" class="modal-dialog hide-dialog">
    <div class="modal-header">
      <span id="close" class="btn-close">关闭</span>
    </div>
    <hr>
    <div class="modal-body">
      <ul class="list-toolbox">
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/archives/"
              rel="noopener noreferrer"
              target="_self"
              >
              博客
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/category/"
              rel="noopener noreferrer"
              target="_self"
              >
              分类
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/tag/"
              rel="noopener noreferrer"
              target="_self"
              >
              标签
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/about/"
              rel="noopener noreferrer"
              target="_self"
              >
              关于
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/atom.xml"
              rel="noopener noreferrer"
              target="_blank"
              >
              RSS
            </a>
          </li>
        
          <li class="item-toolbox">
            <a
              class="ROUND_RECT"
              href="/search/"
              rel="noopener noreferrer"
              target="_self"
              >
              搜索
            </a>
          </li>
        
      </ul>

    </div>
  </div>
</div>



  
      <div class="fexo-comments comments-post">
    
  <section class="disqus-comments">
    <div id="disqus_thread">
      <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    </div>
  </section>

  <script>
    var disqus_shortname = 'forsigner';
    
    var disqus_url = 'http://hanlyjiang.github.io/2016/08/08/hexo使用笔记/';
    
    (function(){
      var dsq = document.createElement('script');
      dsq.type = 'text/javascript';
      dsq.async = true;
      dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
  </script>

  <script id="dsq-count-scr" src="//forsigner.disqus.com/count.js" async></script>



    




  </div>

  

  <script type="text/javascript">
  function loadScript(url, callback) {
    var script = document.createElement('script')
    script.type = 'text/javascript';

    if (script.readyState) { //IE
      script.onreadystatechange = function() {
        if (script.readyState == 'loaded' ||
          script.readyState == 'complete') {
          script.onreadystatechange = null;
          callback();
        }
      };
    } else { //Others
      script.onload = function() {
        callback();
      };
    }

    script.src = url;
    document.getElementsByTagName('head')[0].appendChild(script);
  }

  window.onload = function() {
    loadScript('/js/bundle.js?235683', function() {
      // load success
    });
  }
</script>

</body>
</html>
